package com.myideas.webapp.action;

import java.io.Serializable;
import java.util.List;

import com.myideas.webapp.action.BasePage;
import com.myideas.model.Knowledge;
import com.myideas.service.GenericManager;
import com.myideas.service.KnowledgeManager;

public class KnowledgeList extends BasePage implements Serializable {
    private KnowledgeManager knowledgeManager;

    public void setKnowledgeManager(KnowledgeManager knowledgeManager) {
        this.knowledgeManager = knowledgeManager;
    }

    public KnowledgeList() {
        setSortColumn("id"); // sets the default sort column
    }

    public List getKnowledges() {
        return sort(knowledgeManager.getAll()); 
    }
}

